@charset "UTF-8";

.layout {
  width: 100%;
  height: 100%;
  background-color: @content-bg-color;

  .header {
    width: 100%;
    height: 55px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    background-color: @theme-color;

    .header-logo {
      width: 200px;
      height: 100%;
      line-height: 55px;
      float: left;
      position: relative;

      .header-logo-img {
        height: 32px;
        width: 32px;
        margin-left: 20px;
        margin-top: 12px;
        float: left;
      }

      .header-logo-title {
        float: left;
        margin-left: 10px;
        color: #ffffff;
        cursor: pointer;
        font-size: 16px;
      }

      .header-logo-line {
        float: right;
        border-right: 1px solid hsla(0, 0%, 100%, 0.2);
        height: 100%;
      }
    }

    .trigger {
      font-size: 20px;
      padding: 18px 24px 0px 24px;
      transition: color 0.3s;
      cursor: pointer;
      color: #ffffff;
    }

    .header-menu {
      position: absolute;
      left: 250px;
      top: 0;

      a {
        display: inline-block;
        margin: 0 20px;
        position: relative;
        height: 55px;
        line-height: 55px;
        color: #ffffff;
        opacity: 0.6;
        cursor: pointer;
        transition: all 0.2s ease-in-out;

        &.on,
        &:hover {
          opacity: 1;
        }

        &.on:after {
          content: "";
          display: block;
          width: 100%;
          height: 4px;
          background-color: @menu-active-color;
          position: absolute;
          bottom: 0;
          left: 0;
        }

        .anticon {
          margin-right: 5px;
        }
      }

      .header-menu-wrap {
        display: none;
        height: 40px;
        border-right: 1px solid hsla(0, 0%, 100%, 0.2);

        .anticon {
          font-size: 22px;
          color: #ffffff;
          float: left;
          width: 40px;
          height: 40px;
          line-height: 45px;
          padding: 0 5px;
        }
      }
    }

    .header-items {
      float: right;
      margin: 0 15px 0 0;
      position: relative;
      color: #ffffff;
      line-height: 55px;

      .header-item {
        display: inline-block;
        padding: 0 6px;
        line-height: 55px;
        cursor: pointer;
        align-self: center;

        .header-item-icon {
          color: #ffffff;
          font-size: 16px;
          padding: 4px;
        }

        &:hover {
          background: @menu-hover-color;
        }
      }

      .header-avatar {
        transition: all 0.3s;
        height: 100%;
        padding: 0 10px;

        .ant-avatar-icon {
          padding: 0;
          margin-right: 10px;
        }
        .ant-dropdown-menu-item {
          .anticon {
            margin-right: 10px;
          }
          span {
            font-size: @font-size-sm;
          }
        }
      }
    }
  }

  .sidebar {
    width: 200px;
    position: fixed;
    top: 55px;
    left: 0;
    bottom: 0;
    z-index: 20;
    overflow-y: hidden;
    background: #fff;
    border-right: 1px solid @menu-border-color;

    .ant-menu-inline {
      width: 198px;
      border: none;

      .ant-menu-item {
        margin: 0;
        &::after {
          border-right: 2px solid @menu-active-color;
        }
      }

      .ant-menu-submenu span,
      .ant-menu-item {
        font-size: @font-size-sm;
        font-weight: 700;
      }
    }
  }

  .menu-bg {
    position: fixed;
    top: 80px;
    bottom: 0;
    left: 0;
    right: 0;
    background: @content-bg-color;
    z-index: 19;
  }

  .layout-content {
    position: relative;
    margin-left: 200px;
    padding-top: 55px;
    flex: auto;

    .container {
      padding: 14px 12px;
      background-color: @content-bg-color;
    }
  }
}

@mini-width: 80px;
.layout-mini {
  .header {
    .header-logo {
      width: @mini-width;

      .header-logo-title {
        display: none;
      }
    }
    .header-menu {
      left: 130px;
    }
  }

  .sidebar {
    width: @mini-width;
  }

  .layout-content {
    margin-left: @mini-width;
  }
}

@media (max-width: 768px) {
  .layout {
    .header {
      height: 80px;

      .header-logo {
        width: 150px;
        height: 40px;

        .header-logo-img {
          width: 22px;
          height: 22px;
          top: 13px;
          margin-left: 12px;
        }

        .header-logo-title {
          line-height: 40px;
          font-size: @font-size-sm;
        }

        .header-logo-line {
          display: none;
        }
      }

      .trigger {
        display: none;
      }

      .header-items {
        line-height: 40px;
        .header-item {
          line-height: 40px;
        }
      }

      .header-menu {
        position: absolute;
        width: 100%;
        height: 40px;
        top: 40px;
        left: 0;
        border-top: 1px solid hsla(0, 0%, 100%, 0.2);

        a {
          margin: 0;
          padding: 0 15px;
          height: 39px;
          line-height: 40px;
          vertical-align: top;

          .anticon {
            font-size: 18px;
            margin: 0;
          }

          span.title {
            display: none;
          }
        }

        .header-menu-wrap {
          display: inline-block;
        }
      }
    }

    .sidebar {
      top: 80px;
      border: none;
      width: auto;
      bottom: auto;
    }

    .layout-content {
      margin-left: 0;
      padding-top: 80px;
    }
  }
}

@media (min-width: 769px) {
  .sidebar {
    display: block !important;
  }
}
